const http = require('http')
const url = require('url')

var reqUrl = 'http://localhost:8081/'
var options = url.parse(reqUrl)
options.method = 'POST'

var username=process.argv[2]
var password=process.argv[3]
var user={
    username:username,
    password:password
}

var userStr=JSON.stringify(user)

var request=http.request(options,(res)=>{
    // res是从服务端响应回来的
})
request.write(userStr)
request.end()